package org.aspire.graphics;

import org.aspire.data.Owner;
import org.aspire.math.geom.Dimensioned;

/******************************************************************************
 * An object that provides a display view where user can see all the currently
 * rendered data. This is responsible for initializing the screen and 
 * generating the draw graphics that the renderer will use to perform its own
 * function.
 * 
 * @author JPACarabuena
 *****************************************************************************/
public interface DisplayView extends Dimensioned {

	// ========================================================================
	// Final Fields
	// ========================================================================
	
	// ========================================================================
	// Getters & Setters
	// ========================================================================
	
	/**************************************************************************
	 * Gets the owner of this display view.
	 * 
	 * @return	the owner of this display view.
	 *************************************************************************/
	public Owner getOwner();
	
	// ========================================================================
	// Override Methods
	// ========================================================================
	
	// ========================================================================
	// Methods
	// ========================================================================
	
	/**************************************************************************
	 * Gets the back buffer generated by this display view. This back buffer
	 * will be used by the renderer to draw graphical objects to the screen.
	 * 
	 * @return	the draw graphics created by this display view.
	 *************************************************************************/
	public DrawGraphics getBackBuffer();
	
	/**************************************************************************
	 * Checks if the contents of the back buffer has been lost. If the contents
	 * were lost, the renderer should repaint the graphics to the screen.
	 * 
	 * @return	Whether or not the back buffer flips.
	 *************************************************************************/
	public boolean flip();
	
	/**************************************************************************
	 * Cleans up system resources used by the display view.
	 *************************************************************************/
	public void cleanup();
	
	// ========================================================================
	// Inner & Anonymous Classes
	// ========================================================================
}